package hjt.com.module_test.bean;

import android.os.Parcel;
import android.os.Parcelable;

/**
 * created by Admin
 * created on 2020/6/13
 */
public class MyListBean implements Parcelable {

    private String name;
    private int age;

    public MyListBean() {
    }

    protected MyListBean(Parcel in) {
        name = in.readString();
        age = in.readInt();
    }

    public static final Creator<MyListBean> CREATOR = new Creator<MyListBean>() {
        @Override
        public MyListBean createFromParcel(Parcel in) {
            return new MyListBean(in);
        }

        @Override
        public MyListBean[] newArray(int size) {
            return new MyListBean[size];
        }
    };

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    @Override
    public int describeContents() {
        return 0;
    }

    @Override
    public void writeToParcel(Parcel dest, int flags) {
        dest.writeString(name);
        dest.writeInt(age);
    }
}
